import java.lang.reflect.*;

public class JavaTest {
    public static void main(String args[]) { 
       try {
            String command = new String("/data/javaexample/test.sh  8888"); //
            Process p = Runtime.getRuntime().exec(command);
            Class pClass = p.getClass();
            Field field = pClass.getDeclaredField("pid");
            field.setAccessible(true);
            int pid = field.getInt(p);
            System.out.printf("pid : %d", pid);
       } catch (Exception e) {
           e.printStackTrace();
       }
   
    }    
}